import Vue from 'vue'
import App from './App'
import store from"./store/vuex.js"

Vue.config.productionTip = false

const baseurl = 'http://152.136.185.210:7878/api/m5'

Vue.prototype.baseurl =baseurl

App.mpType = 'app'

// 时间戳转换
Vue.filter('dateFormat', (dataStr) => {
      var time = new Date(dataStr);
    
      function timeAdd0(str) {
        if (str < 10) {
          str = '0' + str;
        }
        return str
      }
      var y = time.getFullYear();
      var m = time.getMonth() + 1;
      var d = time.getDate();
      var h = time.getHours();
      var mm = time.getMinutes();
      var s = time.getSeconds();
      return y + '-' + timeAdd0(m) + '-' + timeAdd0(d) + ' ' + timeAdd0(h) + ':' + timeAdd0(mm) + ':' + timeAdd0(s);
})

const app = new Vue({
	store,
    ...App
})
app.$mount()
